<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>订单列表</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
  </head>
  
  <body>
<div class="divMain">
	<div class="divTitle">
		<span style="margin-left: 150px;margin-right: 280px;">商品信息</span>
		<span style="margin-left: 120px;margin-right: 20px;">金额</span>
		<span style="margin-left: 50px;margin-right: 40px;">订单状态</span>
		<span style="margin-left: 100px;margin-right: 100px;">操作</span>
	</div>
	<br/>
	<table align="center" border="2" width="90%" cellpadding="0" cellspacing="0">

<c:forEach items="${orders}" var="order">
		<tr class="tt" style="padding-top: 10px; padding-bottom: 10px;">
			<td width="320px">订单号：${order.orderId }</td>
			<td width="200px">下单时间：${order.orderTime }</td>
		   <!--  <td>&nbsp;
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td > -->
			
	<%-- <a class="link2" href="<c:url value='/BookServlet?method=load&bid=${orderItem.book.bid }'/>">
	    <img border="0" width="70" src="<c:url value='/${orderItem.book.image_b }'/>"/>
	</a> --%>
 <%--  </c:forEach> --%>
			<td width="115px">
				<center><span class="price_t">&yen;${order.total }</span></center>
			</td>
			<td width="142px"><center>
<c:choose>
	<c:when test="${order.status eq 1 }">(等待付款)</c:when>
	<c:when test="${order.status eq 2 }">(准备发货)</c:when>
	<c:when test="${order.status eq 3 }">(等待确认)</c:when>
	<c:when test="${order.status eq 0 }">(交易成功)</c:when>
</c:choose>	</center>		
			</td>
			<td><center>
			<a href="<c:url value='/orderController/userorderlist'/>">查看</a><br/>
<c:if test="${order.status eq 1 }">
				<a href="<c:url value='/orderController/payView/${order.orderId } }'/>">支付</a><br/>
				<a href="<c:url value='/orderController/deleteOrder/${order.orderId}'/>">删除</a><br/>						
</c:if>
<c:if test="${order.status eq 3 }">
				<a href="<c:url value='/orderController/confirmView/${order.orderId}'/>">确认收货</a><br/>
</c:if>
			</center></td>
		</tr>
</c:forEach>
	</table>
	<br/>
	<%-- <%@include file="/jsp/pager/pager.jsp" %> --%>
</div>
  </body>
</html>
